import request from '@/utils/request'

// 查询上楼费配置列表
export function listStairfee(query) {
  return request({
    url: '/business/stairfee/list',
    method: 'get',
    params: query
  })
}

// 查询上楼费配置详细
export function getStairfee(id) {
  return request({
    url: '/business/stairfee/' + id,
    method: 'get'
  })
}

// 新增上楼费配置
export function addStairfee(data) {
  return request({
    url: '/business/stairfee',
    method: 'post',
    data: data
  })
}

// 修改上楼费配置
export function updateStairfee(data) {
  return request({
    url: '/business/stairfee',
    method: 'put',
    data: data
  })
}

// 上楼费配置状态修改
export function changeStairfeeStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/business/stairfee/changeStatus',
    method: 'put',
    data: data
  })
}

// 删除上楼费配置
export function delStairfee(id) {
  return request({
    url: '/business/stairfee/' + id,
    method: 'delete'
  })
}
